package org.example.api.pc;

import org.example.R.R;
import org.example.entity.dto.AddAppealCollectDto;
import org.example.service.pc.AppealCollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;


@RestController
@RequestMapping("/api/pc/appeal_collect")
public class PCAppealCollectController {

    @Autowired
    private AppealCollectService appealCollectService;

    @PostMapping("/add")
    public R add(@Valid @RequestBody AddAppealCollectDto dto) {
        return appealCollectService.add(dto);
    }

    @PostMapping("/delete")
    public R delete(@RequestParam("id") Long id){
        return appealCollectService.delete(id);
    }


    @PostMapping("/over")
    public R over(@RequestParam("id") Long id){
        return appealCollectService.over(id);
    }

    @PostMapping("/list")
    public R list(){
        return appealCollectService.pcList();
    }




}
